<%@ page import="org.icress.fusion.shiro.Role" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="main" />
    <g:set var="entityName" value="${message(code: 'shiro.role.label', default: 'Role')}" />
    <title><g:message code="default.show.label" args="[entityName]" /></title>
</head>
<body>
	<div class="nav">
		<shiro:hasPermission permission="role:list">
			<span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
		</shiro:hasPermission>
		<shiro:hasPermission permission="role:create">
			<span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
		</shiro:hasPermission>
	</div> 
    <div class="body">
        <h1>Location: Fusion >> <g:message code="default.show.label" args="[entityName]" /></h1>
        <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
        </g:if>
        <!-- Role Info -->
        <div class="dialog">
        	<g:render template="/shiro/role/show"/>
        </div>
        <div class="buttons">
            <g:form>
                <g:hiddenField name="id" value="${roleInstance?.id}" />
                <shiro:hasPermission permission="role:edit">
                	<span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
                </shiro:hasPermission>
                <shiro:hasPermission permission="role:delete">
                	<span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </shiro:hasPermission>
            </g:form>
        </div>
        <!-- User List -->
        <h1>User List</h1>
        <div class="list">
        	<g:render template="/shiro/user/list" model="[userInstanceList:roleInstance.users]" />
        </div>        
    </div>
</body>
</html>